#include "../../client/rpc_client.hpp"


int main()
{
    // 创建一个发布客户端
    auto client = std::make_shared<rpc::client::TopicClient>("127.0.0.1", 7070);
    // 创建一个主题
    bool ret = client->create("hello");
    if (ret == false)
    {
        errlog("创建主题失败");
        return -1;
    }
    // 向主题发布消息
    for (int i = 0; i < 10; i++)
    {
        client->publish("hello", "hello-" + std::to_string(i));
    }

    // 断开连接
    client->shutdown();

    return 0;
}